import {
  Column,
  PrimaryGeneratedColumn,
  Entity,
  OneToOne,
  OneToMany,
  JoinTable,
  ManyToMany,
} from 'typeorm';

import { User } from '../../user/entities/user.entity';
@Entity('tag')
export class Tag {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column()
  desc: string;

  @ManyToMany(() => User, (user) => user.tags)
  users: User[];
}
